<?php

namespace app\common\validate;

use think\Validate;

class UserLogin extends Validate {

    protected $rule = [
        'mobile' => 'require',
        'code' => 'require',
        'code_type' => 'number|between:1,4',
    ];
    protected $field = [
        'mobile' => '手机号码',
        'code' => '验证码',
        'code_type' => '短信类型'
    ];
    protected $message = [
        'mobile' => '手机号格式不正确',
    ];
    protected $scene = [
        'codebutton' => ['code_type', 'mobile'],
        'register' => ['code_type', 'code', 'mobile'],
        'quickloginbind' => ['code_type', 'code', 'mobile'],
    ];

}
